<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<!-- INTERFACE -->
<composite:interface>
	<composite:attribute name="schedule"/>
	<composite:attribute name="controller"/>
</composite:interface>

<!-- IMPLEMENTATION -->
<composite:implementation>
	<h:outputStylesheet library="css" name="weekTable.css" />
	<div id="#{cc.clientId}">
		<h:panelGrid columns="1">
			<p:dataTable id="scheduleDataTableForDate"
				value="#{cc.attrs.schedule.scheduleSelections[0]}"
				var="scheduleSelection"
				>
				<p:column style="width: 79px;">
					<h:outputText value=""/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.monday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[0].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.tuesday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[1].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.wednesday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[2].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.thursday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[3].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.friday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[4].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.saturday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[5].dateDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<f:facet name="header">
						<h:outputText value="#{translatorService.translate('generateSchedule.sunday')}"/>
					</f:facet>
					<h:outputText value="#{scheduleSelection.scheduleCells[6].dateDescription}"/>
				</p:column>
			</p:dataTable>
			<p:dataTable id="scheduleDataTable"
				value="#{cc.attrs.schedule.scheduleSelections}"
				var="scheduleSelection"
				>
				<p:column style="width: 79px;">
					<h:outputText value="#{scheduleSelection.typeOfWorkDescription}"/>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[0].doctorId}" disabled="#{!scheduleSelection.scheduleCells[0].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[1].doctorId}" disabled="#{!scheduleSelection.scheduleCells[1].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[2].doctorId}" disabled="#{!scheduleSelection.scheduleCells[2].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[3].doctorId}" disabled="#{!scheduleSelection.scheduleCells[3].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[4].doctorId}" disabled="#{!scheduleSelection.scheduleCells[4].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[5].doctorId}" disabled="#{!scheduleSelection.scheduleCells[5].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
				<p:column style="width: 98px;">
					<h:selectOneMenu  value="#{scheduleSelection.scheduleCells[6].doctorId}" disabled="#{!scheduleSelection.scheduleCells[6].active}">
						<f:selectItems value="#{cc.attrs.controller.getDiscreteValueProvider().getDoctorsSurname()}" />
					</h:selectOneMenu>
				</p:column>
			</p:dataTable>
		</h:panelGrid>
	</div>
</composite:implementation>
</html>
